<?php

namespace Modules\Api\Http\Controllers;

use App\Models\Banner;
use App\Models\GoodsClass;
use App\Models\System;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Http\Controllers\Controller;
use Yansongda\Pay\Log;

class ApiController extends Controller
{
    //首页轮播
    public function banner(){
        try{
            $banner = Banner::get();
            return self::success(['banner'=>$banner]);
        }catch (\Exception $e){
            Log::error($e);
            return self::error(500);
        }
    }

    //审核
    public function openApi(){
        try{
            $system = System::find(1);
            return self::success(["open"=>$system['open']]);
        }catch (\Exception $e){
            Log::error($e);
            return self::error(500);
        }
    }


}
